<?php
//functions
require_once("NewClass.php");
//'text','password','textarea','radiobutton','checkbox','select'
$create = new smartic_elements();
$create->sets('select','country')->
	setOption('required',true)->
	setOption('length','','200')->
	setOption('label','Countries')->
	setOption('pattern','English')->
	setOption('default-value',array(1,3,5))->
	setOption('multi-selection',true)->
	setOption('list','mysql','id','country','SELECT id,country FROM sm_countries','LIMIT 5')->
	publishIt();
/*$create->sets('captcha','security')->
	setOption('param','class="formelements"')->
	setOption('label','Security')->
	setOption('length','','200')->
	setOption('pattern','Email')->
	setOption('default-value','smartic_xp@gmail.com')->
	publishIt();*/
$create->sets('text','email')->
	setOption('required',true)->
	setOption('param','class="formelements"')->
	setOption('label','Email address')->
	setOption('length','','200')->
	setOption('pattern','Email')->
	setOption('default-value','smartic_xp@gmail.com')->
	publishIt();

if(smartic_elements::$errors_c_num > 0){
	print_r($create->errors['creationErrors']);
}
//print_r($create->elements);
//print_r($create->errors);
//print_r($_POST);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="style/global.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<form action="" method="post" enctype="application/x-www-form-urlencoded" name="postData" id="postData">
  <div class="mainframe">
    <div class="buttons">
      <input name="next" type="submit" value="Next >>>>>" class="btn" />
    </div>
    <div class="container">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="3" valign="top"><h1>Form Details</h1>
            <hr /></td>
        </tr>
        <tr>
          <td valign="top"><?php $create->render('country','label'); ?></td>
          <td valign="top"><?php $create->render('country','field'); ?></td>
        </tr>
        <tr>
          <td valign="top"><?php $create->render('security','label'); ?></td>
          <td valign="top"><?php $create->render('security','field'); ?></td>
        </tr>
        <tr>
          <td valign="top"><?php $create->render('email','label'); ?></td>
          <td valign="top"><?php $create->render('email','field'); ?></td>
        </tr>
      </table>
      </tr>
    </div>
  </div>
</form>
</body>
</html>